Optimal. Leaf size=78 \[ -\frac {x}{a}+\frac {3 \tanh ^{-1}(\sin (c+d x))}{8 a d}+\frac {(8-3 \sec (c+d x)) \tan (c+d x)}{8 a d}-\frac {(4-3 \sec (c+d x)) \tan ^3(c+d x)}{12 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3973, 3966,
3855} \begin {gather*} \frac {3 \tanh ^{-1}(\sin (c+d x))}{8 a d}-\frac {\tan ^3(c+d x) (4-3 \sec (c+d x))}{12 a d}+\frac {\tan (c+d x) (8-3 \sec (c+d x))}{8 a d}-\frac {x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 3966
Rule 3973
Rubi steps
\begin {align*} \int \frac {\tan ^6(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int (-a+a \sec (c+d x)) \tan ^4(c+d x) \, dx}{a^2}\\ &=-\frac {(4-3 \sec (c+d x)) \tan ^3(c+d x)}{12 a d}-\frac {\int (-4 a+3 a \sec (c+d x)) \tan ^2(c+d x) \, dx}{4 a^2}\\ &=\frac {(8-3 \sec (c+d x)) \tan (c+d x)}{8 a d}-\frac {(4-3 \sec (c+d x)) \tan ^3(c+d x)}{12 a d}+\frac {\int (-8 a+3 a \sec (c+d x)) \, dx}{8 a^2}\\ &=-\frac {x}{a}+\frac {(8-3 \sec (c+d x)) \tan (c+d x)}{8 a d}-\frac {(4-3 \sec (c+d x)) \tan ^3(c+d x)}{12 a d}+\frac {3 \int \sec (c+d x) \, dx}{8 a}\\ &=-\frac {x}{a}+\frac {3 \tanh ^{-1}(\sin (c+d x))}{8 a d}+\frac {(8-3 \sec (c+d x)) \tan (c+d x)}{8 a d}-\frac {(4-3 \sec (c+d x)) \tan ^3(c+d x)}{12 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(893\) vs. \(2(78)=156\).
time = 6.47, size = 893, normalized size = 11.45 \begin {gather*} -\frac {2 x \cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x)}{a+a \sec (c+d x)}-\frac {3 \cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec (c+d x)}{4 d (a+a \sec (c+d x))}+\frac {3 \cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec (c+d x)}{4 d (a+a \sec (c+d x))}+\frac {\cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x)}{8 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^4}-\frac {\cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x) \sin \left (\frac {d x}{2}\right )}{3 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^3}+\frac {\cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x) \left (-19 \cos \left (\frac {c}{2}\right )+11 \sin \left (\frac {c}{2}\right )\right )}{24 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^2}+\frac {8 \cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x) \sin \left (\frac {d x}{2}\right )}{3 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}-\frac {\cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x)}{8 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^4}-\frac {\cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x) \sin \left (\frac {d x}{2}\right )}{3 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^3}+\frac {\cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x) \left (19 \cos \left (\frac {c}{2}\right )+11 \sin \left (\frac {c}{2}\right )\right )}{24 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^2}+\frac {8 \cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (c+d x) \sin \left (\frac {d x}{2}\right )}{3 d (a+a \sec (c+d x)) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(169\) vs.
\(2(72)=144\).
time = 0.11, size = 170, normalized size = 2.18
method | result | size |
risch | \(-\frac {x}{a}+\frac {i \left (15 \,{\mathrm e}^{7 i \left (d x +c \right )}+48 \,{\mathrm e}^{6 i \left (d x +c \right )}-9 \,{\mathrm e}^{5 i \left (d x +c \right )}+96 \,{\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{3 i \left (d x +c \right )}+80 \,{\mathrm e}^{2 i \left (d x +c \right )}-15 \,{\mathrm e}^{i \left (d x +c \right )}+32\right )}{12 d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 a d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 a d}\) | \(151\) |
derivativedivides | \(\frac {-2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {5}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {5}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a d}\) | \(170\) |
default | \(\frac {-2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {5}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {5}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {11}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a d}\) | \(170\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 247 vs.
\(2 (72) = 144\).
time = 0.48, size = 247, normalized size = 3.17 \begin {gather*} \frac {\frac {2 \, {\left (\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {71 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {137 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {33 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a - \frac {4 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {48 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 5.21, size = 107, normalized size = 1.37 \begin {gather*} -\frac {48 \, d x \cos \left (d x + c\right )^{4} - 9 \, \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + 9 \, \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (32 \, \cos \left (d x + c\right )^{3} - 15 \, \cos \left (d x + c\right )^{2} - 8 \, \cos \left (d x + c\right ) + 6\right )} \sin \left (d x + c\right )}{48 \, a d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\tan ^{6}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.09, size = 123, normalized size = 1.58 \begin {gather*} -\frac {\frac {24 \, {\left (d x + c\right )}}{a} - \frac {9 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} + \frac {9 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} + \frac {2 \, {\left (33 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 137 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 71 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4} a}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.00, size = 139, normalized size = 1.78 \begin {gather*} \frac {3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a\,d}-\frac {x}{a}+\frac {-\frac {11\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {137\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}-\frac {71\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}+\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________